package com.my.hotel.service.impl;

import com.my.hotel.entity.Order;
import com.my.hotel.entity.OrderDTO;
import com.my.hotel.mapper.OrderMapper;
import com.my.hotel.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;


    public void kf_order(Order order) {
        orderMapper.kf_order(order);
    }

    public int kf_order_maxId() {
        return orderMapper.kf_order_maxId();
    }

    public List<OrderDTO> getOrderList(int userId,String orderStatus,String evaStatus) {
        return orderMapper.getOrderList(userId,orderStatus,evaStatus);
    }

    public void updEvaStatus(String evaStatus,String orderId) {
        orderMapper.updEvaStatus(evaStatus,orderId);
    }
}
